package com.itcase.innerclass.Demo01;

/*
内部类的好处可以直接使用外部类的成员，甚至私有的东西，省去了传参的过程
*/
public class Outer {
    private String name;
    private String age;

    public Outer() {
    }

    public Outer(String name, String age) {
        this.name = name;
        this.age = age;
    }
    public void OuterMethod(){
        System.out.println(name);
        System.out.println(age);
    }

    public class inner{
        private String aaa;
        private String ccc;

        public inner() {
        }

        public inner(String aaa, String ccc) {
            this.aaa = aaa;
            this.ccc = ccc;
        }
        public void innerMethod(){
            System.out.println(name);
            System.out.println(age);
            System.out.println(aaa);
            System.out.println(ccc);
        }
    }
}
